package com.hycloud.cloudstack.common;

public class CloudstackApiException extends Exception {
	
	private static final long serialVersionUID = -3941745335695936259L;
	
	private Integer errorcode;

	private String errortext;

	public CloudstackApiException(Integer errorcode, String errortext) {
		super();
		this.errorcode = errorcode;
		this.errortext = errortext;
	}

	@Override
	public String getMessage() {
		if (errorcode != null)
			return errorcode + ":" + errortext;
		else
			return super.getMessage();
	}

}
